<template>
    <header>
        <b @click="back">返回</b>
        <h4>{{title}}</h4>
        <slot></slot>
    </header>
</template>
<script>
export default {
    props:['title'],
    methods:{
        back(){
            this.$router.push('/')
        }
    }
}
</script>
<style lang="scss" scoped>
    header{
        width: 100%;
        height: 50px;
        border-bottom: 1px solid #ccc;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0 20px;
    }
</style>